Specific script for a formal module

Hi,

for some formal modules, i need use specific script, to not use on others.

Is it possible to have a menu dedicated to a module and not others ?
Is it possible to do this with a script 'embedded' in this module ?

Thanks
Pierre
PDU - Wed Sep 19 01:43:33 EDT 2012

Re: Specific script for a formal module
adevicq - Wed Sep 19 03:35:14 EDT 2012

Hi,

If I had to do this, I would open a dialog box that proposes the appropriate choices depending on the module. Or you can play with the config/formal.dxl code. There is a "createAddinsMenu" function in whiwh you can get the module that is currently opening (the current module).

How will ou recognize the module type? By its name, by a specific module attribute?

Alain

Re: Specific script for a formal module
PDU - Wed Sep 19 04:36:06 EDT 2012

adevicq - Wed Sep 19 03:35:14 EDT 2012
Hi,

If I had to do this, I would open a dialog box that proposes the appropriate choices depending on the module. Or you can play with the config/formal.dxl code. There is a "createAddinsMenu" function in whiwh you can get the module that is currently opening (the current module).

How will ou recognize the module type? By its name, by a specific module attribute?

Alain

Hi Alain,

i know about create specific menu; I have modiifed formalFilesELTA.dxl and formalPopupFilesELTA.dxl to propose to the users specific menus for formal modules.

So it is possible test module name and modify menus.

But it is not very good solution : if user modify module name, menus disappear !

If it is possible modify menu with a script embedded inside a module (with a trigger ?), this can be a solution.

But a don't know if it is possible, or if another solution can be better.

Pierre

Re: Specific script for a formal module
Mathias Mamsch - Thu Sep 20 09:52:01 EDT 2012

PDU - Wed Sep 19 04:36:06 EDT 2012
Hi Alain,

i know about create specific menu; I have modiifed formalFilesELTA.dxl and formalPopupFilesELTA.dxl to propose to the users specific menus for formal modules.

So it is possible test module name and modify menus.

But it is not very good solution : if user modify module name, menus disappear !

If it is possible modify menu with a script embedded inside a module (with a trigger ?), this can be a solution.

But a don't know if it is possible, or if another solution can be better.

Pierre

I could have sworn, that Louie pasted some code that will load a new addins menu in DOORS 9, but I cannot find the post or the perm that is responsible for that. Strange.

Anyway, if renaming is the problem, you can use module/folder IDs to compensate for this, if you choose the formalMenus solution. If you want a trigger solution you can pop up a floating dialog with a custom menu, when the user opens the module. I don't think you can manipulate the module/object menu from a trigger. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Specific script for a formal module
PDU - Thu Sep 20 11:08:16 EDT 2012

Mathias Mamsch - Thu Sep 20 09:52:01 EDT 2012
I could have sworn, that Louie pasted some code that will load a new addins menu in DOORS 9, but I cannot find the post or the perm that is responsible for that. Strange.

Anyway, if renaming is the problem, you can use module/folder IDs to compensate for this, if you choose the formalMenus solution. If you want a trigger solution you can pop up a floating dialog with a custom menu, when the user opens the module. I don't think you can manipulate the module/object menu from a trigger. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Hi Mathias,

i try this :

Trigger

Trigger TestTrigger = trigger( "TestTrigger", module->"Test_Trigger", pre, open, 5, "#include <D:/_DOORS/__SupportInterne/ALS_Tests_menu_spécifique_module/TestTriggerMenu.dxl>")


TestTriggerMenu.dxl :

 

createMenu(alwaysOn,"MenusTest", 'I', null)
 
    createItem(alwaysOn, "Editeur de liens", 'M', null, modKeyCtrl,  null ,null, "Affichage", 
                                                        null,  "D:/_DOORS/__SupportInterne/ALS_Tests_menu_spécifique_module/link_ed.dxl")
 
        separator
end menu



Result :



 

 

-R-E- DXL: <D:/_DOORS/__SupportInterne/ALS_Tests_menu_spécifique_module/TestTriggerMenu.dxl:2> function may not be called outside menu/buttonbar configuration
-I- DXL: execution halted



I understand that it is not possible create menu from trigger, but perhaps my code is wrong ?

Pierre



 

Re: Specific script for a formal module
Mathias Mamsch - Thu Sep 20 11:26:08 EDT 2012

PDU - Thu Sep 20 11:08:16 EDT 2012

Hi Mathias,

i try this :

Trigger

Trigger TestTrigger = trigger( "TestTrigger", module->"Test_Trigger", pre, open, 5, "#include <D:/_DOORS/__SupportInterne/ALS_Tests_menu_spécifique_module/TestTriggerMenu.dxl>")


TestTriggerMenu.dxl :

 

createMenu(alwaysOn,"MenusTest", 'I', null)
 
    createItem(alwaysOn, "Editeur de liens", 'M', null, modKeyCtrl,  null ,null, "Affichage", 
                                                        null,  "D:/_DOORS/__SupportInterne/ALS_Tests_menu_spécifique_module/link_ed.dxl")
 
        separator
end menu



Result :



 

 

-R-E- DXL: <D:/_DOORS/__SupportInterne/ALS_Tests_menu_spécifique_module/TestTriggerMenu.dxl:2> function may not be called outside menu/buttonbar configuration
-I- DXL: execution halted



I understand that it is not possible create menu from trigger, but perhaps my code is wrong ?

Pierre



 

Yes you are right. That is why I suggested to open a floating dialog with the menu, instead of configuring
the module menu. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS